<?php require_once('Select_town/Connections/connection.php'); ?>
<?php
mysql_select_db($database_connection, $connection);
$query_rs_town = "SELECT * FROM tbl_town ORDER BY town_name ASC";
$rs_town = mysql_query($query_rs_town, $connection) or die(mysql_error());
?>


<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title> BeautyClinic  </title>

     <!-- Linking styles -->
	<link rel="stylesheet" href="css/screen.css" type="text/css" media="screen" title="default" />
 

	 <!--[if IE]>	<link rel="stylesheet" media="all" type="text/css" href="css/pro_dropline_ie.css" />	<![endif]-->

	<!--  jquery core -- styled file upload scrip -->
	<script src="js/jquery/jquery-1.4.1.min.js" type="text/javascript"></script>
 
	<!--  styled file upload script --> 
	<script src="js/jquery/jquery.filestyle.js" type="text/javascript"></script>
	<script type="text/javascript" charset="utf-8">
	  $(function() {
		  $("input.file_1").filestyle({ 
			  image: "images/forms/choose-file.gif",
			  imageheight : 30,
			  imagewidth : 100,
			  width : 320
		  });
	  });
	</script>


<!-- Start ------ Select Zone Town Amphur -->
<script type="text/javascript" src="http://localhost/myWeb/Select_town/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
 	$("#town_id").change(function(){
	
		var url = "Select_town/amphur.php?town_id="+$(this).val() ;

		$.getJSON(
				url ,
				function(resp){
					var opt = "<option value='0'>-- อำเภอ --</option>";
					
					for(var i=0;i<resp.length;i++){
						opt += "<option value='"+ resp[i].amphur_id+"'>"+resp[i].amphur_name+"</option>";
					}
					$("#amphur_id").html( opt );
				} 
		);
	});
})
</script>
<script type="text/javascript">
$(function(){
 	$("#amphur_id").change(function(){
	
		var url = "Select_town/tambon.php?amphur_id="+$(this).val() ;

		$.getJSON(
				url ,
				function(resp){
					var opt = "<option value='0'>-- ตำบล --</option>";
					
					for(var i=0;i<resp.length;i++){
						opt += "<option value='"+ resp[i].tambon_id+"'>"+resp[i].tambon_name+"</option>";
					}	
					$("#tambon_id").html( opt );
				} 
		);
	});
})
</script>
<!-- End ------ Select Zone Town Amphur -->


</head>

  
 
<body> 


	<!--  START Header -->
	<div id="Header">
			<!-- Start: page-top --> 	
			<div id="page-top"> </div>
			<!-- End: page-top -->
		<div class="clear">&nbsp;</div>
	</div>
	<!-- End: Header -->
	

<!--  START nav-outer-repeat -->
<div class="nav-outer-repeat"> 

<!--  ............................................................................ START main .............  -->
<div id ="main">

	<!--  start nav-outer -->
	<div class="nav-outer"> 

		<!-- start nav-right -->
		<div id="nav-right">	
				<? if(isset($_COOKIE["USER"]) == false){ ?>
                 <? } else{ ?>
	            <? } ?>

  
				<div class="clear">&nbsp;</div>		 
		</div> <!--  END nav-right -->


		<!--  start nav left-->
		<div class="nav">
		<div class="table">
				<div class="nav-divider">&nbsp;</div>
				
				<ul class="current"><li> <a href="./index.php"> <b> หน้าหลัก </b> </a> </li></ul>
				<div class="nav-divider">&nbsp;</div>
								
				<ul class="select"><li> <a href="./clinic.php"> <b> ศูนย์ศัลยกรรม </b> </a> </li></ul>
				<div class="nav-divider">&nbsp;</div>
			
				<ul class="select"><li><a href="./doctor.php"> <b> ศัลยแพทย์ </b> </a> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul>
				<div class="nav-divider">&nbsp;</div>
			
				<ul class="select"><li><a href="#nogo"> <b> รีวิวการศัลยกรรม </b> </a> </li> </ul>
				<div class="nav-divider">&nbsp;</div>		
				
				<ul class="select"><li><a href="#nogo"> <b> ศัลย์วาไรตี้ </b> </a> </li> </ul>
				<div class="nav-divider">&nbsp;</div>
	 
				<div class="clear"></div>
		</div> <!--  END table -->

				<div class="clear"></div>	
		</div> <!--  END nav -->

			<div class="clear"></div>
	</div> <!--  END nav-outer -->

</div> <!--- end main -->

</div>
<!--  END nav-outer-repeat -->





<div id="content-bg">
</div>


 



<!--  ............................................................................ START main .............  -->
<div id ="main">
							

 <div id="container-top-out">
 
 
  
<!--  START --- c-dr_member --> 
<div id="c-dr_member">	

 <p align="right">  ยินดีต้อนรับ คุณ     <?=$_COOKIE["USER"]?>     </p>
<br>

	<div id=" ">
	  
 	<div class="titlebar"> เพิ่มข้อมูลศัลยแพทย์  (กรุณากรอกทุกช่องที่มี  <font color=red>*</font> )</div> 

 
<form action="AddSave_doctor.php" name="frmAdd" method="POST">				<!--  START --- Form Add save --> 


<fieldset>
	<legend>       ข้อมูลศัลยแพทย์    </legend>
		 <table border="0" id="c-dr_bg-reg-form"    width="876px">
  					<tr><td rowspan=34 width="40px"></td></tr>
				<tr>
					<th valign="middle"  width="130px">ชื่อ - นามสกุล <font color=red>*</font> </th>
					<td valign="top"  ><input type="text" name="dr_name" id="dr_name" class="c-dr-reg_member"  " /></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle"  width="130px">เพศ <font color=red>*</font> </th>
					<td valign="top" >	<select   name="dr_sex" id="dr_sex" class="c-dr-reg_member_selectbox" >
											<option value="ชาย">ชาย</option>
											<option value="หญิง">หญิง</option>
 										</select>
					</td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle"  width="130px">ชื่อสถานที่ทำงาน <font color=red>*</font> </th>
					<td valign="top" >	<select name="clinic_name" id="clinic_name" class="c-dr-reg_member_selectbox" >
											<option > </option>
											<option value="0">คลินิกเชียงใหม่</option>
											<option value="1">เชียงใหม่ความงาม</option>
											<option value="2">นิมมานคลินิก</option>
										</select>
					</td>
				</tr>
				<tr><td> &nbsp; </td></tr>			 
				<tr>
 					<th valign="middle">สถานที่ทำงานอื่น ๆ    </th>
					<td valign="middle"><input type="text" name="clinic_name" id="clinic_name" class="c-dr-reg_member" />  <font color=red>*</font> หากไม่มีในตัวเลือก โปรดระบุชื่อสถานที่ทำงานที่ท่านประจำอยู่ที่นี่</td>
 				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle">ที่ตั้งศูนย์ศัลยกรรม  <font color=red>*</font> </th>
					<td valign="top"><input type="text" name="clinic_add" id="clinic_add" class="c-dr-reg_member" /></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle" for="town_id">จังหวัด  <font color=red>*</font> </th>
					<td valign="top">	
												<select name="clinic_town" id="town_id" class="c-dr-reg_member_selectbox">
														<option value="0">-- เลือกจังหวัด --</option>
													<?php while( $row_rs_town= mysql_fetch_assoc($rs_town) ) : ?>
														<option value="<?php echo $row_rs_town['town_id']?>"><?php echo $row_rs_town['town_name']?></option>
													<?php endwhile ;?>
												</select>
					</td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle" for="amphur_id" > อำเภอ <font color=red>*</font> </th>
					<td valign="top" > 
												<select name="clinic_amphur" id="amphur_id" class="c-dr-reg_member_selectbox">
														<option value="0">-- เลือกอำเภอ --</option>
													<?php while( $row_rs_amphur = mysql_fetch_assoc($rs_amphur) ) : ?>
														<option value="<?php echo $row_rs_amphur['amphur_id']?>"><?php echo $row_rs_amphur['amphur_name']?></option>
													<?php endwhile ;?>
												</select>

					</td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle" for="tambon_id" > ตำบล <font color=red>*</font> </th>
					<td valign="top" >	 
 
												<select name="clinic_tambon" id="tambon_id" class="c-dr-reg_member_selectbox">
															<option value="0">-- เลือกตำบล --</option>
												</select>
					</td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle">รหัสไปรษณีย์  <font color=red>*</font> </th>
					<td valign="top"><input type="text" name="post" id="post" class="c-dr-reg_member_small" /></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle"> เบอร์โทรศัพท์  <font color=red>*</font> </th>
					<td valign="top"><input type="text" name="tel" id="tel" class="c-dr-reg_member_small" /></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="top">ประวัติการศึกษา     </th>
					<td valign="top"><textarea  class="comment3" name="dr_edu"></textarea></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="top">ความเชี่ยวชาญพิเศษ     </th>
					<td valign="top"><textarea  class="comment3" name="dr_special"></textarea></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="top">รายละเอียดอื่น ๆ     </th>
					<td valign="top"><textarea  class="comment3" name="dr_pre"></textarea></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle">ภาพหมอ    </th>
					<td valign="top"><input type="file" name="filUpload" id="clinic_pic" class="file_1" /></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
				<tr>
					<th valign="middle">แผนที่ที่ทำงาน   <font color=red>*</font>   </th>
					<td valign="top"><input type="text" name="map" id="map" class="c-dr-reg_member" /></td>
				</tr>
				<tr><td> &nbsp; </td></tr>
  			 </table>
</fieldset>


	<table border="0" id="c-dr_bg-reg-form" class="c-dr-reg_table" >
 		<tr> <td width=270px></td>
 			<td width=230px> <input type="submit" id="form-submit" class="awesome orange large"  value="สร้างบัญชีผู้ใช้งาน" /> </td>
					<td >	<input type="button" id="form-submit" class="awesome orange large"  value="ล้างข้อมูลทั้งหมด" />
					</td>
				</tr>
	 		</table>


</form>	 <!--  END --- form --> 

 
	 </div>
	<!--  end content -->
 
 </div>
<!--  end c-dr_member -->

  
  </div>
<!--  end container -->






<div class="clear">&nbsp;</div>
 <div class="clear">&nbsp;</div>
    
<!-- start footer -->         
<div id="footer">
<!-- <div id="footer-pad">&nbsp;</div> -->
	<!--  start footer-left -->
	<div id="footer-left"> Contact : beautyclinic@info	
	  <a href="">BeautyClinic &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a>.</div>
	<!--  end footer-left -->
	<div class="clear">&nbsp;</div>
</div>
<!-- end footer -->
 

 </div>
<!-- END main ........................................................................................................................ END -->

 
</body>
</html>


 